package com.tsing.cedap.rest.vo.reqVo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author TheTsing
 * @create 2022-01-28 9:30
 */
@Getter
@Setter
@Accessors(chain = true)
public class PlaceOrderReqVo {

    @ApiModelProperty("快递品牌id")
    @NotBlank(message = "快递品牌id不能为空")
    private String expressBrandId;

    @ApiModelProperty("取件码")
    @NotBlank(message = "取件码不能为空")
    private String expressCode;

    @ApiModelProperty("货物类型")
    @NotBlank(message = "货物类型不能为空")
    private String wareType;

    @ApiModelProperty("重量  kg")
    @NotNull(message = "重量不能为空（kg）")
    private BigDecimal weight;

    @ApiModelProperty("收件人")
    @NotBlank(message = "收件人不能为空")
    private String name;

    @ApiModelProperty("收件人电话")
    @NotBlank(message = "收件人电话不能为空")
    private String phone;

    @ApiModelProperty("备注")
    private String description;

    @ApiModelProperty("地址id")
    @NotBlank(message = "地址id不能为空")
    private String receivingAddressId;

    @ApiModelProperty("期望时间")
    @NotNull(message = "期望时间不能为空")
    private Long expectedTime;

    @ApiModelProperty("打赏小费")
    @NotNull(message = "打赏小费不能为空")
    private BigDecimal tip;

    @ApiModelProperty("支付方式 1：线上，2：线下")
    @NotNull(message = "支付方式不能为空")
    @Range(min = 1, max = 2, message = "只能传入1或者2，1：线上，2：线下")
    private Integer paymentMethod;

}
